#
#2008 Julka Lipkova
#

import pygtk
pygtk.require('2.0')
import gtk

class Glyph ():
    def __init__(self):
        self.name='No name'

    def loadFromFile(self, filename):
        f = open( filename, 'r' )
        self.name = f.readline().rstrip('\n')
        print 'Reading glyph with name %s' %self.name
        n = int(f.readline())
        self.categories = []
        for i in range(n):
            self.categories.append( f.readline().rstrip('\n') )
        nline = int(f.readline())
        self.lines = []
        for i in range(nline):
            np = int(f.readline())
            line = []
            for i in range(np):
                x,y = map( float, f.readline().rstrip('\n').split() )
                line.append( (x,y) )
            self.lines.append(line)
        f.close()

# vim: set ts=4 sw=4 sts=4 et :
